package org.ling.xuan.entity;

import cn.hutool.core.io.FileUtil;
import lombok.Data;
import org.ling.xuan.util.HundSunParseUtil;

import java.util.ArrayList;
import java.util.List;

/**
 * 恒生版本信息
 *
 * @author liting50684
 * @date 2023/08/07
 */
@Data
public class HundSonInfo {
    private String authSetting;
    private String systemName;
    private String fileName;
    private String filePath;

    private String annotationText;
    private String annotationAuthText;
    private String annotationAuth;
    private String annotationVersionText;
    private String annotationVersion;
    private String annotationFileNameText;
    private String annotationFileName;

    private String lastAnnotationText;
    private String lastAnnotationContent;
    private String lastAnnotationVersion;
    private String lastAnnotationModifyId;

    private String methodVersionText;
    private String methodVersion;


    private String hundSonColText;

    private String hundSonDateText;
    private String hundSonDate;

    private String hundSonVersionText;
    private String hundSonVersion;

    private String hundSonDesText;
    private String hundSonDes;

    private int checkStatus = 1;
    private List<String> checkMsg = new ArrayList<>();
    private String content;

    public HundSonInfo() {
    }

    public HundSonInfo(String filePath, String systemName, String auth) {
        fileName = FileUtil.getName(filePath);
        this.filePath = filePath;
        this.systemName = systemName;
        this.authSetting = auth;
        this.content = FileUtil.readUtf8String(filePath);
        HundSunParseUtil.parse(content, this);
    }

    public void check() {

    }


}
